/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Current;

import Current.BattleUpgradesLib.DefenseUpgrades;
import Current.BattleUpgradesLib.OffenseUpgrades;

import java.io.Serializable;

/**
 * @author Fork
 */
public class BattleUpgrades implements Serializable, Cloneable {

    private OffenseUpgrades offUpgrades;
    private DefenseUpgrades defUpgrades;
    private UnitTraining units;

    public BattleUpgrades(OffenseUpgrades offUpgrades, DefenseUpgrades defUpgrades, UnitTraining units) {
        this.offUpgrades = offUpgrades;
        this.defUpgrades = defUpgrades;
        this.units = units;
    }

    public BattleUpgrades(UnitTraining units) {
        this.offUpgrades = new OffenseUpgrades(units.getExpertGuards());
        this.defUpgrades = new DefenseUpgrades(units.getExpertGuards());
    }

    public DefenseUpgrades getDefUpgrades() {
        return defUpgrades;
    }

    public void setDefUpgrades(DefenseUpgrades defUpgrades) {
        this.defUpgrades = defUpgrades;
    }

    public OffenseUpgrades getOffUpgrades() {
        return offUpgrades;
    }

    public void setOffUpgrades(OffenseUpgrades offUpgrades) {
        this.offUpgrades = offUpgrades;
    }

    public UnitTraining getUnits() {
        return units;
    }

    public void setUnits(UnitTraining units) {
        this.units = units;
    }

    public Integer getOffenseBonusFromUpgrades() {
        return this.offUpgrades.getOffenseFromUpgrades();
    }

    public Integer getDefenseBonusFromUpgrades() {
        return this.defUpgrades.getDefenseFromUpgrades();
    }
}
